package com.hadoop.rpc;

import org.apache.hadoop.ipc.ProtocolSignature;

import java.io.IOException;

/**
 * @author: hujinhui
 * @description:
 * @date: 2021/7/25
 */
public class MyInterfaceImpl implements MyInterface{

    public String findName(int studentId) {
        if (studentId == 123456) {
            return "姓名：studentName";
        }
        return null;
    }

    @Override
    public long getProtocolVersion(String s, long l) throws IOException {
        return MyInterface.versionID;
    }

    @Override
    public ProtocolSignature getProtocolSignature(String s, long l, int i) throws IOException {
        return new ProtocolSignature(MyInterface.versionID, null);
    }
}
